package com.zb.zeus.system.api.domain.dto;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 
 * @author liangfan
 * @date 2021/07/12 16:02
 **/

@Data
public class WxNews {

    @NotEmpty(message = "消息不能为空")
    @JsonProperty("articles")
    @JSONField(name = "articles")
    private List<Article> articles;


    @Data
    public static class Article {


        @JsonProperty("title")
        @JSONField(name = "title")
        @ApiModelProperty("标题")
        @NotNull(message = "标题不能为空")
        private String title;


        @JsonProperty("description")
        @JSONField(name = "description")
        @ApiModelProperty("描述")
        private String description;


        @JsonProperty("url")
        @JSONField(name = "url")
        @ApiModelProperty("点击后跳转的链接")
        @NotNull(message = "点击后跳转的链接,不能为空")
        private String url;


        @JsonProperty("picurl")
        @JSONField(name = "picurl")
        @ApiModelProperty("图文消息的图片链接")
        private String picurl;
    }
}
